<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>  
<%@ page import="java.sql.Date, kr.cadis.clms.dao.*, kr.cadis.clms.model.*" %>    
<%
	Date spendDate = Date.valueOf(request.getParameter("spendDate"));	
	Date beforeDate = Date.valueOf(request.getParameter("beforeDate"));
	int money = Integer.parseInt(request.getParameter("money"));
	
	DailySpend dailySpend = new DailySpend();
	dailySpend.setSpendDate(spendDate);
	dailySpend.setMoney(money);
	dailySpend.setBeforeDate(beforeDate);
	
	DailySpendDao dailySpendDao = new DailySpendDao();
	boolean bf = dailySpendDao.update(dailySpend);
	
	if(bf == true) {
		response.sendRedirect("List.jsp");	
	}
	else {		
%>
<script type="text/javascript">
<!--
		alert("사용 정보를  DB 에 수정하는 데 오류가 있습니다.");
		window.location.href = "List.jsp";
//-->
</script>
<%		
	}
%>